package ${basepackage}.model.vo.${databaseNameCamel}.${table.unCapGenerateClassName};

import javax.validation.GroupSequence;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import com.excalibur.core.model.BaseObject;

import ${basepackage}.model.vo.validation.IConstraintGroup;
import ${basepackage}.model.vo.validation.INotNullGroup;

/**
 * @author "Jiance Qin"
 * 
 * @date 2014年3月10日
 * 
 * @time 下午4:45:29
 * 
 * @desc
 * 
 */
@GroupSequence(value = { INotNullGroup.class, IConstraintGroup.class,
		Add${table.generateClassName}Form.class })
public class Add${table.generateClassName}Form extends BaseObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
    <#list table.commonColumns as column>
    <#if column.type != "Date" && column.type == "String">
    @NotBlank(message = "{webapp.page.${databaseNameCamel}.${table.unCapGenerateClassName}.${column.name?uncap_first}}{webapp.validation.NotBlank}", groups = INotNullGroup.class)
    private ${column.type} ${column.name?uncap_first};
    </#if>
    <#if column.type != "Date" && column.type != "String">
    @NotNull(message = "{webapp.page.${databaseNameCamel}.${table.unCapGenerateClassName}.${column.name?uncap_first}}{webapp.validation.NotNull}", groups = INotNullGroup.class)
    private ${column.type} ${column.name?uncap_first};
    </#if>
    </#list>

    <#list table.commonColumns as column>
    <#if column.type != "Date">
    public ${column.type} get${column.name}() {
        return ${column.name?uncap_first};
    }
    public void set${column.name}(${column.type} ${column.name?uncap_first}) {
        this.${column.name?uncap_first} = ${column.name?uncap_first};
    }
    </#if>
    </#list>

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

}
